﻿using System;
using System.Globalization;
using System.IO;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Shorten.Core.Helpers;
namespace Shorten.Core.Engines
{
    public class ThemeViewEngine : WebFormViewEngine
    {
        public override ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache)
        {
            ViewEngineResult result = null;
            var request = controllerContext.HttpContext.Request;

            if (request != null)
            {
                result = base.FindView(controllerContext, viewName, ThemeHelper.GetTheme(), useCache);
            }

            return result;
        }

    }
}
